{% extends "base.html" %}
{% block title %}Group{% endblock %}
{% block content %}
<!--atsystem-->
                <!--/span-->
                <div class="span9"  id="content">

                    <div class="row-fluid">
                      <!--  <div class="alert alert-success">
                                                        <button type="button" class="close" data-dismiss="alert">&times;</button>
                            <h4>Success</h4>
                                The operation completed successfully</div>-->
                                <div class="navbar">
                                <div class="navbar-inner">
                                        <ul class="breadcrumb">
                                            <i class="icon-chevron-left hide-sidebar"><a href='#' title="Hide Sidebar" rel='tooltip'>&nbsp;</a></i>
                                            <i class="icon-chevron-right show-sidebar" style="display:none;"><a href='#' title="Show Sidebar" rel='tooltip'>&nbsp;</a></i>
                                            <li>
                                                <a href="/admin/">Dashboard</a> <span class="divider">/</span>
                                            </li>
                                            <li>
                                                <a href="/admin/groups/">Groups</a> <span class="divider">/</span> 
                                            </li>
						<!--
                                            <li class="active">Tools</li>-->
                                        </ul>
                                </div>
                                </div>
                        </div>





                    
                     <div class="row-fluid">
                        <!-- block -->
                        <div class="block">
                            <div class="navbar navbar-inner block-header">
                                <div class="muted pull-left">Group List</div>
                            </div>
                            <div class="block-content collapse in">
                                <div class="span12">
                                   <div class="table-toolbar">
                                      <div class="btn-group">
                                         <a href="/admin/groups/groupadd/"><button class="btn btn-success">Add New <i class="icon-plus icon-white"></i></button></a>
                                      </div>
                                      <div class="btn-group pull-right">
                                         <button data-toggle="dropdown" class="btn dropdown-toggle">Tools <span class="caret"></span></button>
                                         <ul class="dropdown-menu">
                                            <li><a href="#">Print</a></li>
                                            <li><a href="#">Print</a></li>
                                            <li><a href="#">Print</a></li>
                                            <li><a href="#">Print</a></li>
                                            <li><a href="#">Save as PDF</a></li>
                                            <li><a href="#">Export to Excel</a></li>
                                         </ul>
                                      </div>
                                   </div>
                                    
                                    <table cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered" id="example2">
                                        <thead>
                                            <tr>
						<th><input class="uniform_on" type="checkbox" id="optionsCheckbox" value="option1"></th>
                                                <th>Groupname</th>
                                                <th>UserCount</th>
                                                <th>Detail&Edit</th>
                                                <th>Operation</th>
                                            </tr>
                                        </thead>
                                        <tbody>
					
						{% for group  in groups %}
                                            <tr class="odd gradeX">
						<td><input name = "checkbox" class="uniform_on" type="checkbox"  value=""></td>

                                                <td>{{group.name}}</td>
                                                <td>{{group.user_set.count}}</td>
						<td><a  href="/admin/groups/groupinfo/{{group.name}}" >Detail&Edit</a>&nbsp;</td>
                                                <td><a id = "delbtn" href="/admin/groups/del_group/{{group.name}}" onclick = "getdata()" class="btn  btn-danger btn-mini"><i class="icon-remove icon-white"></i>Delete</a>&nbsp;</td>
                                            </tr>
						{% endfor %}
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                        </div>
                        <!-- /block -->
                    </div>
                </div>
            </div>

<script type="text/javascript">
function getdata(){
alert("Developing......");

}





</script>





{% endblock %}
